package com.pair.micro.fee.modules.charge.controller;

import com.pair.micro.common.response.MicroResult;
import com.pair.micro.common.utils.PageResult;
import com.pair.micro.fee.modules.charge.query.GardenGridQuery;
import com.pair.micro.fee.modules.charge.service.GardenGridService;
import com.pair.micro.fee.modules.charge.service.GardenService;
import com.pair.micro.fee.modules.charge.vo.GardenGridVO;
import com.pair.micro.fee.modules.charge.vo.GardenVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("fx/gardenGrid")
@Tag(name = "房屋信息管理")
@AllArgsConstructor
public class GardenGridController {
    private GardenGridService gardenGridService;


    @GetMapping(value = "/list")
    @Operation(summary = "获取指定小区的楼房/单元/房间列表")
    public MicroResult<List<GardenGridVO>> gardenGridList(@ParameterObject GardenGridQuery query){
        List<GardenGridVO> list =  gardenGridService.selectGardenGridList(query);
        return MicroResult.ok(list);
    }

}
